Skip to content

[build] Use Arena::Create and pin Java 8 bytecode ahead of protobuf 29 / rules_java 8 - #67720

Open
elliot-barn wants to merge 2 commits into
masterfrom
elliot-barn/protobuf-arena-create
Open

elliot-barn wants to merge 2 commits into
masterfrom
elliot-barn/protobuf-arena-create

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

Description

Two forward-compatible changes needed by the protobuf 29 / rules_java 8 bump. Both are no-ops on master's current versions:

  • Replace Arena::CreateMessage with Arena::Create (server_call.h plus 7 test call sites). CreateMessage is deprecated in newer protobuf. [build] Bazel 8.8.1: bump protobuf to v29.6, rules_java to 8.12.0 and gRPC to 1.69.0 #66483 compiles it out with PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE because GCC 10 warns on its body under -Werror.
  • Add --java_language_version=8. rules_java 7.x already defaults to Java 8. 8.x defaults to 11, which breaks consumers on a Java 8 runtime (e.g. RayDP).

Related issues

Split out of #66483 (protobuf 29 / gRPC 1.69) to make that PR easier to review.

🤖 Generated with Claude Code

Arena::CreateMessage is deprecated in newer protobuf and compiled out under
PROTOBUF_FUTURE_REMOVE_CREATEMESSAGE. Arena::Create does the same thing for
arena-enabled messages and is available in the protobuf Ray pins today, so
this can land ahead of the protobuf 29 bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

rules_java 7.x compiles Java at source/target 8 by default; 8.x defaults
to 11. On the protobuf 29 / rules_java 8 branch (#66483) Ray's jars came out
as class file version 55, which a Java 8 runtime rejects
(UnsupportedClassVersionError in test_raydp and test_logging_java). Pin
--java_language_version=8 now; under rules_java 7.x this matches the
default and changes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
@elliot-barn
elliot-barn force-pushed the elliot-barn/protobuf-arena-create branch from 46b6ffc to 239b18b Compare November 4, 2026 00:43
@elliot-barn elliot-barn changed the title [build] Use Arena::Create and pin Java 8 bytecode ahead of protobuf 29 [build] Use Arena::Create and pin Java 8 bytecode ahead of protobuf 29 / rules_java 8 Nov 4, 2026
@elliot-barn
elliot-barn marked this pull request as ready for review November 5, 2026 00:29
@elliot-barn
elliot-barn requested a review from a team as a code owner November 5, 2026 00:29

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request configures Bazel to emit Java 8 bytecode to prevent breaking consumers on a Java 8 runtime. Additionally, it updates Protobuf Arena allocation calls from google::protobuf::Arena::CreateMessage to google::protobuf::Arena::Create in both gcs_actor_manager_test.cc and server_call.h. There are no review comments, so I have no feedback to provide.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 239b18b. Configure here.

Comment thread src/ray/rpc/server_call.h
record_metrics_(record_metrics),
server_metrics_(server_metrics) {
reply_ = google::protobuf::Arena::CreateMessage<Reply>(&arena_);
reply_ = google::protobuf::Arena::Create<Reply>(&arena_);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arena Create leaves reply unbound

High Severity

On the current protobuf 23.4 pin, Arena::Create default-constructs the reply and does not pass the arena, so GetArena() stays null. HandleGetAllActorInfo then check-fails when show_dead_jobs is true, which is the path that lists actors from finished jobs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 239b18b. Configure here.

@ray-gardener ray-gardener Bot added the core Issues that should be addressed in Ray Core label Nov 5, 2026
@karticam karticam self-assigned this Nov 10, 2026
@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Nov 10, 2026

@Sparks0219 Sparks0219 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, cursor comment is right but if proto upgrade goes in right after then should be fine

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants